<script src="<?= base_url(); ?>third_party/tooltip/lib/jquery.js" type="text/javascript"></script>
<script src="<?= base_url(); ?>third_party/tooltip/lib/jquery.hoverIntent.js" type="text/javascript"></script> <!-- optional -->
<script src="<?= base_url(); ?>third_party/tooltip/jquery.cluetip.js" type="text/javascript"></script>
<link rel="stylesheet" href="<?= base_url(); ?>third_party/tooltip/jquery.cluetip.css" type="text/css" />

<script type="text/javascript">
    $(document).ready(function() {
        $('a.tips').cluetip({
            splitTitle: '|',
            waitImage:true,
            showTitle:true
    });

        $('#houdini').cluetip({
            splitTitle: '|', // use the invoking element's title attribute to populate the clueTip...
            // ...and split the contents into separate divs where there is a "|"
            showTitle: false // hide the clueTip's heading
        });
    });
</script>

<?php 
if($mode == 'USED_CAR') {
?>
<div class="box_2">
    <div class="title reg bold"> 
        <!--<a href="#" class="detail_search inline-block align_right fright">Pagination</a> -->
        <span class="inline-block align_left fleft"><h3 class="color_2"> SEARCH RESULTS OF USED CAR</h3></span> 
        <div class="clear"></div>
    </div>

    <div class="clear"> </div>
    <div id="inner">
        <?php
        if ($listing) {
            ?>
            <ul>
                <?php foreach ($listing as $listing): ?> 
                    <li>
                        <div class="works-list" style="margin-bottom: 10px" >
                            <span class="bold color_2" style="width: 250px;display: inline-block;"> 

                                <a class="tips" 
                                   href="<?= base_url(); ?>view/detail/<?= strtolower(url_title($this->management_model->get_version('CAR', $listing->version)->version)); ?>/<?= $listing->id; ?>" 
                                   title="<?= $this->management_model->get_version('CAR', $listing->version)->version; ?>|
                                   <span style='width:120px; display:inline-block;'> Make Year </span>  <span class='color_2 bold fright'> <?= $listing->make_year; ?> </span> |
                                   <span style='width:120px; display:inline-block;'> Driven (Kms)</span>  <span class='color_2 bold fright'> <?= moneyFormat($listing->km_done); ?> </span>|
                                   <span style='width:120px; display:inline-block;'> Color </span>  <span class='color_2 bold fright'> <?= $listing->color; ?> </span> |
                                   <span style='width:120px; display:inline-block;'>  </span>  <span id='price' class='color_3 bold fright'> Rs. <?= moneyFormat($listing->price); ?> </span> |</br>
                                   <?= substr($listing->comments, 0, 200); ?> ">
                                       <?= $this->management_model->get_version('CAR', $listing->version)->version; ?>
                                </a> 
                            </span>
                            <span  class="align_right" style="width: 100px;display: inline-block;"> <?= moneyFormat($listing->km_done); ?> Kms. </span>
                            <span class="align_right" style="width: 50px;display: inline-block;"> <?= $listing->make_year; ?> </span>
                            <span style="width: 200px;display: inline-block; margin-left: 10px" class="font_1"> 
                                <?= $this->location_model->get_city_name($listing->city); ?>, 
                                <?= $this->location_model->get_state_name($listing->state); ?>
                            </span>
                            <span class="bold color_2" style="width: 20px;display: inline-block;"> <?= moneyFormat($listing->price); ?> </span>

                        </div>  

                    </li>
                <?php endforeach; ?>
            </ul>
            <?php
        }else {
            ?>
            <div class="color_2"> Sorry! Nothing found.. </div>
        <?php } ?>
    </div>
</div> <!-- End of Box_2 -->

<?php 
}
?>





<?php 
if($mode == 'NEW_CAR') {
?>
<div class="box_2">
    <div class="title reg bold"> 
        <!--<a href="#" class="detail_search inline-block align_right fright">Pagination</a> -->
        <span class="inline-block align_left fleft"><h3 class="color_2"> SEARCH RESULTS OF NEW CAR</h3></span> 
        <div class="clear"></div>
    </div>

    <div class="clear"> </div>
    <div id="inner">
        <?php
        if ($listing) {
            ?>
            <ul>
                <?php foreach ($listing as $listing): ?> 
                    <li>
                        <div class="works-list" style="margin-bottom: 10px" >
                            <span class="bold color_2" style="width: 250px;display: inline-block;"> 

                                <a class="tips" 
                                   href="<?= base_url(); ?>view/version/car/<?= strtolower(url_title($listing->version)); ?>/<?=$listing->id;?>" 
                                   title="<?= $listing->version; ?>|
                                   <img border='0' src='<?= base_url(); ?>assets/images/data/car/version/<?=$listing->image ;?>' height='160px' width='250px' /> </br> 
                                   <span style='width:120px; display:inline-block;'> Body </span>  <span class='color_2 bold fright'> <?= $this->pickup_model->get_pickup_info(3,$listing->body)->description; ?> </span> |
                                   <span style='width:120px; display:inline-block;'> Fuel Type </span>  <span class='color_2 bold fright'> <?= $this->pickup_model->get_pickup_info(1,$listing->fuel)->description; ?> </span>|
                                   <span style='width:120px; display:inline-block;'> Transmission </span>  <span class='color_2 bold fright'> <?= $this->pickup_model->get_pickup_info(2,$listing->transmission)->description; ?> </span> | </br>
                                   <span style='width:120px; display:inline-block;'> Price </span>  <span id='price' class='color_3 bold fright'> Rs. <?= moneyFormat($listing->price); ?> </span> |</br>
                                    ">
                                  <?= $listing->version; ?>
                                       
                                </a> 
                            </span>
                            
                            <span  class="align_left" style="width: 65px;display: inline-block;"> <?= $this->pickup_model->get_pickup_info(1,$listing->fuel)->description; ?> </span>
                            <span class="align_left" style="width: 65px;display: inline-block;"> <?= $this->pickup_model->get_pickup_info(3,$listing->body)->description; ?> </span>
                            <span class="bold color_2 align_right" style="width: 100px;display: inline-block;"> <?= moneyFormat($listing->price); ?> </span>
                            <span class="bold color_2 align_right" style="width: 120px;display: inline-block;"> Ratting </span>

                        </div>  

                    </li>
                <?php endforeach; ?>
            </ul>
            <?php
        }else {
            ?>
            <div class="color_2"> Sorry! Nothing found.. </div>
        <?php } ?>
    </div>
</div> <!-- End of Box_2 -->

<?php 
}
?>